package org.yocastlong.mybatisplus.common.enums;

import lombok.Getter;

/**
 * @author 朱海龙
 * 2025/6/10 08:53
 */
@Getter
public enum CommonErrorEnum implements AbstractErrorEnum {


    NeedLoginError("0000001", "用户需要登录");

    private final String errorCode;
    private final String errorMsg;

    CommonErrorEnum(String errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg  = errorMsg;
    }

    @Override
    public Long getErrorCodePre() {
        return 10000L;
    }

    @Override
    public String getModule() {
        return "common";
    }

    public String getErrorCode() {
        return getErrorCodePre() + errorCode;
    }
}
